Imports Microsoft.VisualBasic

Namespace MyDAO
    Public Class MyColumnExpression
        Inherits MyDataExpressionBase

        Protected ColumnName As String
        Protected TableAliasName As String

        Public Sub New(ByVal columnName As String)
            Me.ColumnName = columnName
        End Sub

        Public Sub New(ByVal tableAliasName As String, ByVal columnName As String)
            Me.New(columnName)
            Me.TableAliasName = tableAliasName
        End Sub

        'Public Overrides ReadOnly Property Expression() As String
        '    Get
        '        Return Me.ColumnName
        '    End Get
        'End Property

        Public Overrides Function ToString() As String
            If Me.TableAliasName = "" Then
                Return Me.ColumnName
            Else
                Return String.Format("{0}.{1}", Me.TableAliasName, Me.ColumnName)
            End If

        End Function
    End Class
End Namespace
